<template>
    <div class="content1">
    </div>
    <div class="content2">
        <div>
            <div class="ellipse"></div>
            <el-upload class="upload" action="/api/upload" :file-list="fileList" :on-preview="handlePreview"
                :on-remove="handleRemove" :before-upload="beforeUpload">
                <span class="upload-text">点击上传</span>
            </el-upload>
        </div>
        <el-form :model="form" label-width="120px" class="demo-ruleForm" size="default">
            <el-row>
                <el-col :span="20">
                    <el-form-item label="用户名" prop="name" required>
                        <el-input v-model="form.name" />
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="20">
                    <el-form-item label="场馆名称" prop="name" required>
                        <el-input v-model="form.name" />
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="20">
                    <el-form-item label="email" prop="name" required>
                        <el-input v-model="form.name" />
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="20">
                    <el-form-item label="新密码" prop="name" required>
                        <el-input v-model="form.name" />
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="20">
                    <el-form-item label="旧密码" prop="name" required>
                        <el-input v-model="form.name" />
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="20">
                    <el-form-item label="请确认密码" prop="name" required>
                        <el-input v-model="form.name" />
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </div>
</template>

<script lang="ts" setup>
import { reactive, ref } from 'vue'

const form = reactive({
    name: '',
    region: '',
    date1: '',
    date2: '',
    delivery: false,
    type: [],
    resource: '',
    desc: '',
})
// 上传图片
// export default defineComponent({
//     name: 'UploadEllipse',
//     setup() {
//         const fileList = ref([]);

//         // 图片上传前的钩子函数
//         const beforeUpload = (file: File) => {
//             // TODO: check file size/extension, etc.
//             return true;
//         };

//         // 图片预览的钩子函数
//         const handlePreview = (file: any) => {
//             // TODO: preview file
//         };

//         // 图片移除的钩子函数
//         const handleRemove = (file: any, fileList: any) => {
//             // TODO: remove file
//         };

//         return {
//             fileList,
//             beforeUpload,
//             handlePreview,
//             handleRemove,
//         };
//     },
// });
</script>

<style lang="less" scoped>
.content2 {
    width: 500px;
    height: 500px;
    margin: 0 auto;
    // border: 1px solid red;
    text-align: center;
}

//上传
.ellipse {
    width: 160px;
    height: 170px;
    overflow: hidden;
    border-radius: 50% / 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #eee;
    margin: 0 auto;
}

.upload {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
    background-color: transparent !important;
    border: none !important;
    overflow: hidden;
}
.upload-text {
    font-size: 16px;
    color: #777;
    margin-bottom: 20px;
}
</style>